package com.qijian.maindata.domain.query;


import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.util.List;
import java.util.Set;


/**
 * 数控(锯切)件对象 查询条件类
 *
 * @author qijian
 * @date 2021-11-30
 */

@Data
@ToString
@TableName("main_nc")
public class NcQuery {

    @WhereType(filed = "nc_id")
    private Long ncId;
    @WhereType(filed = "project_id")
    private Long projectId;
    @WhereType(tableName = "main_project", filed = "project_no")
    private String projectNo;
    @WhereType(tableName = "main_project", filed = "machine_no")
    private String machineNo;
    @WhereType(filed = "bom_id")
    private Long bomId;
    @WhereType(filed = "item_id")
    private Long itemId;
    @WhereType(tableName = "main_item", filed = "item_name")
    private String itemName;
    @WhereType(tableName = "main_item", filed = "item_code")
    private String itemCode;
    @WhereType(tableName = "main_item", filed = "part_no")
    private String partNo;
    @WhereType(tableName = "main_item", filed = "drawing_no")
    private String drawingNo;
    @WhereType(filed = "process_id")
    private Long processId;
    @WhereType(filed = "process_name", tableName = "main_line_process", type = WhereTypeEnum.LIKE)
    private String processName;
    @WhereType(filed = "remark", tableName = "main_line_process", type = WhereTypeEnum.LIKE)
    private String processRemark;
    @WhereType(filed = "item_name", tableName = "main_line_process_item", type = WhereTypeEnum.LIKE)
    private String useItemName;
    @WhereType(filed = "use_item_id")
    private Long useItemId;
    @WhereType(filed = "total", type = WhereTypeEnum.GT)
    private Long total;
    @WhereType(filed = "surplus", type = WhereTypeEnum.GT)
    private Long surplus;
    @WhereType(filed = "nesting", type = WhereTypeEnum.GT)
    private Long nesting;
    @WhereType(filed = "remark")
    private String remark;
    @WhereType(filed = "item_classify",tableName = "i1")
    private String useItemType;
    @WhereType(filed = "item_classify",tableName = "i1", type = WhereTypeEnum.IN)
    private List<String> useItemTypes;
    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "project_id", type = WhereTypeEnum.IN)
    private Set<Long> projectIds;

    @WhereType(func = " main_nc.total = main_nc.surplus and main_nc.total = main_nc.nesting")
    private Boolean checkQuantity;

    @WhereType(tableName = "nc_excel_executor", filed = "nc_type")
    private String excelNcType;

    @WhereType(tableName = "nc_excel_executor", filed = "user_id")
    private Long excelNcUserId;

    @WhereType(tableName = "nc_excel_executor", filed = "version")
    private String excelNcVersion;

    @WhereType(tableName = "main_project",filed = "status",type = WhereTypeEnum.IN)
    private List<Integer> projectStatusList;

    @WhereType(filed = "project_id", type = WhereTypeEnum.IN)
    private List<Long> projectIdsList;

}
